package com.example.demo.redis.mapper;

import com.example.demo.model.Material;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created by 86151 on 2018/12/27.
 */
@Mapper
public interface RedisTestMapper {
    @Select("select * from Material where id = #{id}")
    List<Material> queryMarterial(@Param("id") Integer id);
    @Update("update Material set materialCode=#{materialCode},materialName=#{materialName},status=#{status} where id=#{id}")
    int updateMaterial(Material material);
    @Select("select * from Material where id = #{id}")
    Material queryMarterialById(@Param("id") Integer id);

    @Delete("delete from Material where id=#{id}")
    int deleteMaterial(@Param("id") Integer id);
}
